package com.core.website.mapper;

import com.core.website.entity.DutyTemplate;
import com.core.website.entity.DutyTemplateDetail;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface DutyMapper {
    int updateDefault();
    int addTemplate(DutyTemplate dutyTemplate);
    int deleteDutyByTemplateDetailIds(List<String> list);
    List<DutyTemplate> queryTemplateAll();
    DutyTemplate queryTemplateDefault();
    DutyTemplate queryTemplateOne(String id);
    int addTemplateDetail(DutyTemplateDetail dutyTemplateDetail);
    int deleteTemplateDetail(List<String> list);
    List<DutyTemplateDetail> queryDetailByTemplateId(String templateId);
    DutyTemplateDetail queryDetailById(String detailId);

    List<Map<String,Object>> queryDutyByDay(String day);
    List<Map<String,Object>> queryMonthDutyAndUserName(Map map);
    int add(@Param("id") String id, @Param("name") String name, @Param("day") Date day);
    int addDutyAndUserName(@Param("id") String id, @Param("name") String name, @Param("day") Date day,@Param("dutyUserName") String dutyUserName);
    int deleteDutyByDay(Date day);
}
